<!DOCTYPE html>
<html>

<head>
  <title>{{ post.title }}</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      max-width: 800px;
      margin: 0 auto;
      padding: 20px;
      background-color: #f5f5f5;
    }

    .post {
      background: white;
      padding: 30px;
      border-radius: 5px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    h1 {
      color: #4CAF50;
      margin-top: 0;
    }

    .date {
      color: #888;
      font-size: 0.9em;
      margin-bottom: 20px;
    }

    .content {
      line-height: 1.8;
      color: #444;
      white-space: pre-line;
    }

    .back-link {
      display: inline-block;
      margin-top: 20px;
      color: #4CAF50;
      text-decoration: none;
      font-weight: bold;
    }

    .back-link:hover {
      text-decoration: underline;
    }
  </style>
</head>

<body>
  <div class="post">
    <h1>{{ post.title }}</h1>
    <p class="date">发布时间: {{ post.published_date }}</p>
    <div class="content">{{ post.content }}</div>
    <a href="{% url 'post_list' %}" class="back-link">← 返回博客列表</a>
  </div>
</body>

</html>